package com.axter.app.process;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.support.annotation.Nullable;

/**
 * Created by apple on 2017/6/29.
 */

public class MyService extends Service {
    private String str = "default";
    public class MyServiceImpl extends IMyService.Stub {
        @Override
        public String getValue() throws RemoteException {
            return str;
        }

        @Override
        public void setValue(String _str) throws RemoteException {
            str = _str;
        }
    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        System.out.println("create intent");
        return new MyServiceImpl();
    }
}
